﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserManage.aspx.cs" Inherits="Support_UserManage" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>用户管理</title>
    <script type="text/javascript" src="../JavaScript/JQuery/jquery-1.6.2.min.js"></script>
    <script type="text/javascript" src="../JavaScript/JQuery/jquery-ui-1.8.16.custom.min.js"></script>
    <script type="text/javascript" src="../JavaScript/UserManage.js"></script>
    <link rel="Stylesheet" href="../CSS/redmond/jquery-ui-1.8.16.custom.css" />    
    <link rel="stylesheet" href="../CSS/UserManage.css" />
</head>
<body>
    <form id="form1" runat="server">
    <div id="UserDiv">
        <p>
            <label for="ULogin_I" style="font-size:14px;">登录名:</label>
            <asp:TextBox id="ULogin_I" runat="server" MaxLength="100" CssClass="text ui-widget-content"></asp:TextBox>
            <asp:Button ID="QueryUser" runat="server" Text="查询" OnClick="QueryUser_Click" />
            <input id="AddUser" type="button" value="新增用户" />
        </p> 
        <asp:GridView ID="UserList" runat="server" AutoGenerateColumns="False" EmptyDataText="对不起,未找到相关数据！" Width="100%" CssClass="ui-widget ui-widget-content" OnRowCommand="UserList_RowCommand">
            <HeaderStyle CssClass="ui-widget-header" />
            <Columns>
                <asp:BoundField DataField="ULOGIN" HeaderText="登录名" SortExpression="ULOGIN" ReadOnly="True" >
                    <ItemStyle Font-Italic="True" />
                </asp:BoundField>
                <asp:BoundField DataField="UNAME" HeaderText="姓名" SortExpression="UNAME" />
                <asp:BoundField DataField="Dep" HeaderText="组织机构" SortExpression="UNAME" />
                <asp:BoundField DataField="ROLE" HeaderText="角色" SortExpression="ROLE" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="IFVALID" HeaderText="当前状态" SortExpression="IFVALID" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:TemplateField>
                    <ItemStyle HorizontalAlign="Right" />
                    <ItemTemplate>
                        <asp:Button ID="ResetPassword" runat="server" Font-Size="13px" CausesValidation="false" Text="密码重置" CommandName="Reset" CommandArgument='<%# Bind("ULOGIN")%>' CssClass="key" OnClientClick="return confirm('确认需要重置密码吗？');"/>
                        <asp:Button ID="ChargeStatus" runat="server" Font-Size="13px" CausesValidation="false" Text="状态切换" CommandName="Charge" CommandArgument='<%# Bind("ULOGIN")%>' CssClass="Status" />                        
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>  
        <div style="text-align: right; padding: 5px;">
                <webdiyer:AspNetPager ID="UserPager" runat="server" OnPageChanged="UserPager_PageChanged">
                </webdiyer:AspNetPager>
            </div>         
    </div>
    <div id="AddUserDiv" title="新增用户" style="display:none;">
        <fieldset>
            <p>
            <label for="User_Login_A">登录名:</label>
            <asp:TextBox ID="User_Login_A" runat="server" CssClass="text ui-widget-content ui-corner-all" MaxLength="20" Width="120"></asp:TextBox></p>
            <p>
            <label for="Real_Name_A">姓名:</label>
            <asp:TextBox ID="Real_Name_A" runat="server" CssClass="text ui-widget-content ui-corner-all" MaxLength="20" Width="120"></asp:TextBox></p>
            <p>                
                <label for="DEPT_NO_A">组织机构:</label>
                <asp:DropDownList ID="DEPT_NO_A" runat="server" CssClass="ui-widget-content">
                </asp:DropDownList>
            </p>
            <p>
                <label for="Role_A">角色:</label>
                <asp:DropDownList ID="Role_A" runat="server" CssClass="ui-widget-content">
                    <asp:ListItem Value="告警查询" Selected="True">告警查询</asp:ListItem>
                    <asp:ListItem Value="信息管理">信息管理</asp:ListItem>
                    <asp:ListItem Value="系统管理">系统管理</asp:ListItem>
                </asp:DropDownList>
            </p>
        </fieldset>
        <p id="ActionP">
        <asp:Button ID="BtnCreate" runat="server" Text="创建" OnClick="BtnCreate_Click"/>
        <input id="BtnCancel" type="button" value="取消" /></p>
    </div>
    </form>
</body>
</html>
